Timeout requirements have been added to improve overall protocol efficiency or detect error conditions in many fields including storage, communication, networking, etc. For example, there are many timeouts defined in serial SCSI (SAS) protocol such as COMSAS/COMINIT timeout in OOB sequence, ALIGN timeout, Identify timeout, ACK/NAK timeout, Done timeout, Break timeout, DWS Reset timeout, Credit timeout, Open/Close timeout, and many more. Certain timeouts have specific timeout values, for instance, ACK/NAK timeout value is 1 millisecond, COMSAS detect timeout minimum requires 1365 us, etc. Some timeout requirements are in the link and phy layers, while some timeouts are required in transport layer.
In addition to the protocol specific timeouts, there is another important timeout, input/output (I/O) timeout, defined and used to track the overall latency of an entire IO and usually it's tracked by application layer or software/firmware. IO timeout timer usually starts on processing new IO and ends on receiving final response of that IO.
Typical timeout implementations define those timeout counters across all different layers, and each functional block has its own set of timeout counters. For example, the link layer may define a millisecond (ms) counter for those ms second timeouts such as ACK/NAK timeout, RRDY timeout, etc. and one counter for OOB related timeouts which usually phy layer handles most of the tasks and so on. Moreover, those counters may be duplicated in each lane to track their own timeout events which may be less optimal in terms of gate count. Implementing so many timeout applications in a platform results in a complex design, especially when the design supports multiple different storage protocols such as SAS, STP, SMP, SATA, or Fibre Channel.